package main

import (
	_ "fmt"
	_ "github.com/gin-gonic/gin"
	"github.com/spf13/viper"
	"local/config"
	"local/databases/redis"
	"local/routers"
	_ "net/http"
)

/**
 * main
 */
func main() {

	config.InitConfig()

	//初始化redis
	redis.InitRedis()

	//设置路由
	r := routers.SetupRouters()

	//加载端口号
	port := viper.GetString("server.port")
	_ = r.Run(":" + port)
}
